


✅ ADMIN PANEL - View - reply.blade.php

<div class="table-responsive">
    <table class="table table-bordered" id="example1">
        <thead>
            <tr>
                <th>SL</th>
                <th>Post</th>
                <th>Comment</th>
                <th>Name & Email</th>
                <th>Reply</th>
                <th>Reply By</th>
                <th>Status</th>
                <th class="w_50">Action</th>
            </tr>
        </thead>
        <tbody>
            @foreach($replies as $reply)
            <tr>
                
                <td class="pt_10 pb_10">
                    @if($reply->reply_by == 'User')
                    <a href="" class="btn btn-info btn-sm" data-bs-toggle="modal" data-bs-target="#modal_change_status_{{ $reply->id }}"><i class="fas fa-check-circle"></i></a>
                    @endif
                    <a href="" class="btn btn-danger btn-sm" data-bs-toggle="modal" data-bs-target="#modal_delete_{{ $reply->id }}"><i class="fas fa-trash"></i></a>
                </td>

                <div class="modal fade" id="modal_change_status_{{ $reply->id }}" tabindex="-1" aria-hidden="true">
                    <div class="modal-dialog">
                        <div class="modal-content">
                            <div class="modal-header">
                                <h5 class="modal-title">Change Status</h5>
                                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                            </div>
                            <div class="modal-body">
                                <form action="{{ route('admin.post.reply.change', $reply->id) }}" method="post" enctype="multipart/form-data">
                                @csrf
                                    <div class="row">
                                        <div class="col-lg-12 mb-3">
                                            <label for="">Select Status *</label>
                                            <select name="status" class="form-select">
                                                <option value="Pending">Pending</option>
                                                <option value="Approved">Approved</option>
                                            </select>
                                        </div>
                                    </div>
                                    <button type="submit" class="btn btn-primary">Update</button>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="modal fade" id="modal_delete_{{ $reply->id }}" tabindex="-1" aria-hidden="true">
                    <div class="modal-dialog">
                        <div class="modal-content">
                            <div class="modal-header">
                                <h5 class="modal-title">Delete Item</h5>
                                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                            </div>
                            <div class="modal-body">
                                <form action="{{ route('admin.post.reply.destroy', $reply->id) }}" method="post">
                                @csrf
                                <div class="mb-3">
                                    <label for="">Do you want to delete this item?</label>
                                </div>
                                <button type="submit" class="btn btn-danger">Delete</button>
                            </form>
                            </div>
                        </div>
                    </div>
                </div>
            </tr>
            @endforeach
        </tbody>
    </table>
</div>
